package cn.larry.demo.service;

import javax.annotation.PostConstruct;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Profile;
import org.springframework.core.convert.ConversionService;
import org.springframework.stereotype.Service;

/**
 * @author LarryZeal
 *
 */
@Profile("conversionService")
@Service
public class ConversionServiceDemo {
	@Autowired
	private ConversionService conversionService;

	@PostConstruct
	public void doIt() {
		Integer value = conversionService.convert("1234", int.class);
		System.out.println(value);
	}
}
